<#import "../../layout.html" as c>
<#import "../../list_layout.html" as list>
<#assign alertList = []/>
<#assign alertList = alertList + ["内容列表列表默认显示系统全部资讯，按添加时间顺序排列。可通过高级搜索通过分类项索引某分类内的资讯并进行编辑。"]/>
<#assign alertList = alertList + ["资讯排序数值越小，排列位置越靠前，排序相同的资讯，最新发布排在前面。"]/>
<#assign alertList = alertList + ["为了配合前台页面模板的展示规整，协议类的资讯不可以删除，这些资讯的所属分类不可变更。"]/>
<@c.html title="Index">
  <@list.html title="内容管理" subTitle="内容管理" alertList=alertList permi="sys:information:save" addBtn=true searchHint="请输入标题进行搜索">
  </@list.html>

  <!-- ================== 开始页面所需CSS引入 ================== -->
  <!-- 富文本编辑器 -->
  <link type="text/css" rel="stylesheet" href="${pluginsRoot}ueditor/themes/default/css/ueditor.css">
  <link type="text/css" rel="stylesheet" href="${pluginsRoot}/jquery.dtGrid/dependents/datePicker/skin/WdatePicker.css" />
  <link type="text/css" rel="stylesheet" href="${pluginsRoot}/jquery.dtGrid/dependents/datePicker/skin/default/datepicker.css" />
  <!-- ================== 开始页面所需CSS引入 ================== -->

  <!-- ================== 开始页面操作权限 ================== -->
  <@shiro.hasPermission name="sys:information:edit">
  <input type="hidden" id="informationEdit" value="1"/>
  </@shiro.hasPermission>
  <@shiro.hasPermission name="sys:information:publish">
  <input type="hidden" id="informationPublish" value="1"/>
  </@shiro.hasPermission>
  <@shiro.hasPermission name="sys:information:back">
  <input type="hidden" id="informationBack" value="1"/>
  </@shiro.hasPermission>
  <@shiro.hasPermission name="sys:information:del">
  <input type="hidden" id="informationDel" value="1"/>
  </@shiro.hasPermission>
  <@shiro.hasPermission name="sys:information:view">
  <input type="hidden" id="informationView" value="1"/>
  </@shiro.hasPermission>
  <!-- ================== 开始页面操作权限================== -->

  <!-- ================== 开始新增资讯模态窗口 ================== -->
  <div class="modal fade" id="addModal" tabindex="-1" role="dialog">
    <div class="modal-dialog modal-lg">
      <div class="modal-content">
        <div class="modal-header">
          <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
          <h4 class="modal-title"> 新增内容 </h4>
        </div>
        <div class="modal-body">
          <form class="form-horizontal form-bordered p-0" action="${adminRoot}article/json/add" id="addForm" method="post" autocomplete="off" data-parsley-validate="true">
              <div class="form-group">
                  <label class="control-label col-md-2 col-sm-3">选择栏目&nbsp;:</label>
                  <div class="col-md-9 col-sm-8">
                      <a data-target='#siteModal' class='btn btn-sm btn-primary m-r-10' data-toggle='modal'><i class='fa fa-plus'>&nbsp;选择栏目</i>&nbsp;</a>
                      <label  id="chooseSiteAdd"></label>
                      <input type="hidden"  name="siteId" value="">
                  </div>
              </div>
              <div class="form-group">
              <label class="control-label col-md-2 col-sm-3">标题<i class="f-s-14 text-danger">*</i>&nbsp;:</label>
              <div class="col-md-9 col-sm-8">
                <input type="text" name="title" class="form-control" placeholder="请输入内容标题" maxlength="100" autocomplete="off" data-tip="tooltip" data-placement="auto" data-original-title="必填项，输入内容控制在2-100个字符。"  data-parsley-required="true" data-parsley-length="[2, 100]"/>
              </div>
            </div>
            <div class="form-group">
              <label class="control-label col-md-2 col-sm-3">作者<i class="f-s-14 text-danger">*</i>&nbsp;:</label>
              <div class="col-md-9 col-sm-8">
                <input type="text" name="author" class="form-control" placeholder="请输入内容作者" maxlength="30" autocomplete="off" data-tip="tooltip" data-placement="auto" data-original-title="必填项，输入内容控制在2-30个字符。"  data-parsley-required="true" data-parsley-length="[2, 30]"/>
              </div>
            </div>
              <div class="form-group">
                  <label class="control-label col-md-2 col-sm-3">来源<i class="f-s-14 text-danger">*</i>&nbsp;:</label>
                  <div class="col-md-9 col-sm-8">
                      <input type="text" name="source" class="form-control" placeholder="请输入内容来源" maxlength="30" autocomplete="off" data-tip="tooltip" data-placement="auto" data-original-title="必填项，输入内容控制在2-30个字符。"  data-parsley-required="true" data-parsley-length="[2, 30]"/>
                  </div>
              </div>
            <div class="form-group">
              <label class="control-label col-md-2 col-sm-3">摘要<i class="f-s-14 text-danger">*</i>&nbsp;:</label>
              <div class="col-md-9 col-sm-8">
                <input type="text" name="summary" class="form-control" placeholder="请输入内容摘要" maxlength="100" autocomplete="off" data-tip="tooltip" data-placement="auto" data-original-title="必填项，输入内容控制在2-100个字符。"  data-parsley-required="true" data-parsley-length="[2, 100]"/>
              </div>
            </div>
            <div class="form-group">
              <label class="control-label col-md-2 col-sm-3">封面图片<i class="f-s-14 text-danger">*</i>&nbsp;:</label>
              <div class="col-md-9 col-sm-8">
                <input type="hidden" id="addFormPicPath" name="litpic" data-parsley-required="true">
                <div class="clickreply-image m-b-15"><img src="${imgRoot}default_image.gif" id="addFormPicImg" alt="" class="media-object viewImage"></div>
                <p class="text-info">封面图片尺寸要求宽度为360像素、高度为200像素；支持格式gif，jpg，png。</p>
                <span class="btn btn-sm btn-white fileinput-button"> <i class="fa fa-upload"></i> <span>文件上传</span>
                <input id="addFormPic" type="file" name="file" autocomplete="off" multiple>
                </span> </div>
            </div>

            <div class="form-group">
              <label class="control-label col-md-2 col-sm-3">排序<i class="f-s-14 text-danger">*</i>&nbsp;:</label>
              <div class="col-md-9 col-sm-8">
                <input type="text" name="sortNo" class="form-control" placeholder="请输入排序" autocomplete="off" value="0" data-tip="tooltip" data-placement="auto" value="0" data-original-title="排序从0~999顺序排列，默认排序为0。" data-parsley-required="true" data-parsley-type="integer" data-parsley-range="[0,999]"/>
              </div>
            </div>

            <div class="form-group">
              <label class="control-label col-md-2 col-sm-3">内容&nbsp;:</label>
              <div class="col-md-9 col-sm-8"><script id="contnetAdd" style="width: 100%; height: 200px;"></script></div>
            </div>

            <div class="form-group no-border">
              <label class="control-label col-md-2 col-sm-3">附件图片&nbsp;:</label>
              <div class="col-md-9 col-sm-8">
                <input type="hidden" id="addFormUploadImage" name="upLoadImage">
                <div class="row article-pic" name="preview"></div>
                <span class="btn btn-sm btn-white fileinput-button" data-tip="tooltip" data-placement="auto" data-original-title="上传图片支持jpg/gif/png格式，大小不要超过2M。上传后可点击“插入”按钮将附件嵌入文本编辑器中。"> <i class="fa fa-upload"></i> <span>文件上传</span>
                <input id="addFormFile" type="file" name="file" autocomplete="off" multiple>
                </span> </div>
            </div>
          </form>
        </div>
        <div class="modal-footer"><a href="javascript:;" class="btn btn-white" data-dismiss="modal">放弃操作</a><a href="javascript:;" class="btn btn-success" data-loading-text="Loading..." nc-ajax-submit-target="addForm" nc-ajax-submit>确认提交</a></div>
      </div>
    </div>
  </div>
  <!-- ================== 结束新增资讯模态窗口 ================== -->

  <!-- ================== 开始编辑资讯模态窗口 ================== -->
  <div class="modal fade" id="editModal" tabindex="-1" role="dialog">
    <div class="modal-dialog modal-lg">
      <div class="modal-content">
        <div class="modal-header">
          <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
          <h4 class="modal-title"> 编辑内容 </h4>
        </div>
        <div class="modal-body">
          <form class="form-horizontal form-bordered p-0" action="${adminRoot}article/json/edit" id="editForm" method="post" autocomplete="off" data-parsley-validate="true">
            <input type="hidden" name="id" value="">
            <div class="form-group">
              <label class="control-label col-md-2 col-sm-3">选择栏目&nbsp;:</label>
              <div class="col-md-9 col-sm-8">
                <a data-target='#siteModal' class='btn btn-sm btn-primary m-r-10' data-toggle='modal'><i class='fa fa-plus'>&nbsp;选择栏目</i>&nbsp;</a>
                <label  id="chooseSiteEdit"></label>
                <input type="hidden"  name="siteId" value="">
              </div>
            </div>
            <div class="form-group">
              <label class="control-label col-md-2 col-sm-3">标题<i class="f-s-14 text-danger">*</i>&nbsp;:</label>
              <div class="col-md-9 col-sm-8">
                <input type="text" name="title" class="form-control" placeholder="请输入内容标题" maxlength="100" autocomplete="off" data-tip="tooltip" data-placement="auto" data-original-title="必填项，输入内容控制在2-100个字符。"  data-parsley-required="true" data-parsley-length="[2, 100]"/>
              </div>
            </div>
            <div class="form-group">
              <label class="control-label col-md-2 col-sm-3">作者<i class="f-s-14 text-danger">*</i>&nbsp;:</label>
              <div class="col-md-9 col-sm-8">
                <input type="text" name="author" class="form-control" placeholder="请输入内容作者" maxlength="30" autocomplete="off" data-tip="tooltip" data-placement="auto" data-original-title="必填项，输入内容控制在2-30个字符。"  data-parsley-required="true" data-parsley-length="[2, 30]"/>
              </div>
            </div>
            <div class="form-group">
              <label class="control-label col-md-2 col-sm-3">来源<i class="f-s-14 text-danger">*</i>&nbsp;:</label>
              <div class="col-md-9 col-sm-8">
                <input type="text" name="source" class="form-control" placeholder="请输入内容来源" maxlength="30" autocomplete="off" data-tip="tooltip" data-placement="auto" data-original-title="必填项，输入内容控制在2-30个字符。"  data-parsley-required="true" data-parsley-length="[2, 30]"/>
              </div>
            </div>
            <div class="form-group">
              <label class="control-label col-md-2 col-sm-3">摘要<i class="f-s-14 text-danger">*</i>&nbsp;:</label>
              <div class="col-md-9 col-sm-8">
                <input type="text" name="summary" class="form-control" placeholder="请输入内容摘要" maxlength="100" autocomplete="off" data-tip="tooltip" data-placement="auto" data-original-title="必填项，输入内容控制在2-100个字符。"  data-parsley-required="true" data-parsley-length="[2, 100]"/>
              </div>
            </div>
            <div class="form-group">
              <label class="control-label col-md-2 col-sm-3">封面图片<i class="f-s-14 text-danger">*</i>&nbsp;:</label>
              <div class="col-md-9 col-sm-8">
                <input type="hidden" id="editFormPicPath" name="litpic" data-parsley-required="true">
                <div class="clickreply-image m-b-15"><img src="${imgRoot}default_image.gif" id="editFormPicImg" alt="" class="media-object viewImage"></div>
                <p class="text-info">封面图片尺寸要求宽度为360像素、高度为200像素；支持格式gif，jpg，png。</p>
                <span class="btn btn-sm btn-white fileinput-button"> <i class="fa fa-upload"></i> <span>文件上传</span>
                <input id="editFormPic" type="file" name="file" autocomplete="off" multiple>
                </span> </div>
            </div>

            <div class="form-group">
              <label class="control-label col-md-2 col-sm-3">排序<i class="f-s-14 text-danger">*</i>&nbsp;:</label>
              <div class="col-md-9 col-sm-8">
                <input type="text" name="sortNo" class="form-control" placeholder="请输入排序" autocomplete="off" value="0" data-tip="tooltip" data-placement="auto" value="0" data-original-title="排序从0~999顺序排列，默认排序为0。" data-parsley-range="[0,999]"/>
              </div>
            </div>

            <div class="form-group">
              <label class="control-label col-md-2 col-sm-3">内容&nbsp;:</label>
              <div class="col-md-9 col-sm-8"><script id="contnetEditor" style="width: 100%; height: 200px;"></script></div>
            </div>

            <div class="form-group no-border">
              <label class="control-label col-md-2 col-sm-3">附件图片&nbsp;:</label>
              <div class="col-md-9 col-sm-8">
                <input type="hidden" id="editFormUploadImage" name="upLoadImage">
                <div class="row article-pic" name="preview"></div>
                <span class="btn btn-sm btn-white fileinput-button" data-tip="tooltip" data-placement="auto" data-original-title="上传图片支持jpg/gif/png格式，大小不要超过2M。上传后可点击“插入”按钮将附件嵌入文本编辑器中。"> <i class="fa fa-upload"></i> <span>文件上传</span>
                <input id="editFormFile" type="file" name="file" autocomplete="off" multiple>
                </span> </div>
            </div>
          </form>
          <!-- 结束设置模块-->
        </div>
        <div class="modal-footer"><a href="javascript:;" class="btn btn-white" data-dismiss="modal">放弃操作</a><a href="javascript:;" class="btn btn-success" data-loading-text="Loading..." nc-ajax-submit-target="editForm" nc-ajax-submit>确认提交</a></div>
      </div>
    </div>
  </div>
  <!-- ================== 结束编辑资讯模态窗口 ================== -->

<!-- ================== 开始查看资讯模态窗口 ================== -->
<div class="modal fade" id="lookModal" tabindex="-1" role="dialog">
  <div class="modal-dialog modal-lg">
    <div class="modal-content">
      <div class="modal-header">
        <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
        <h4 class="modal-title"> 查看内容 </h4>
      </div>
      <div class="modal-body">
        <form class="form-horizontal form-bordered p-0" action="" id="lookForm" method="post" autocomplete="off" data-parsley-validate="true">
          <div class="form-group">
            <label class="control-label col-md-2 col-sm-3">栏目&nbsp;:</label>
            <div class="col-md-9 col-sm-8">
              <input type="text" name="site.name" value="" class="form-control"  autocomplete="off" data-tip="tooltip" data-placement="auto" readonly="true"/>
            </div>
          </div>
          <div class="form-group">
            <label class="control-label col-md-2 col-sm-3">标题&nbsp;:</label>
            <div class="col-md-9 col-sm-8">
              <input type="text" name="title" value="" class="form-control"  autocomplete="off" data-tip="tooltip" data-placement="auto" readonly="true"/>
            </div>
          </div>
          <div class="form-group">
            <label class="control-label col-md-2 col-sm-3">作者&nbsp;:</label>
            <div class="col-md-9 col-sm-8">
              <input type="text" name="author" value="" class="form-control"  autocomplete="off" data-tip="tooltip" data-placement="auto" readonly="true"/>
            </div>
          </div>
          <div class="form-group">
            <label class="control-label col-md-2 col-sm-3">来源&nbsp;:</label>
            <div class="col-md-9 col-sm-8">
              <input type="text" name="source" value="" class="form-control"  autocomplete="off" data-tip="tooltip" data-placement="auto" readonly="true"/>
            </div>
          </div>
          <div class="form-group">
            <label class="control-label col-md-2 col-sm-3">摘要&nbsp;:</label>
            <div class="col-md-9 col-sm-8">
              <input type="text" name="summary" value="" class="form-control"  autocomplete="off" data-tip="tooltip" data-placement="auto" readonly="true"/>
            </div>
          </div>
          <div class="form-group">
            <label class="control-label col-md-2 col-sm-3">封面图片<i class="f-s-14 text-danger">*</i>&nbsp;:</label>
            <div class="col-md-9 col-sm-9">
              <img src="${imgRoot}default_image.gif" id="lookFormPicImg" alt="" class="media-object viewImage">
            </div>
          </div>
          <div class="form-group">
            <label class="control-label col-md-2 col-sm-3">排序&nbsp;:</label>
            <div class="col-md-9 col-sm-8">
              <input type="text" name="sortNo" value="" class="form-control"  autocomplete="off" data-tip="tooltip" data-placement="auto" readonly="true"/>
            </div>
          </div>
          <div class="form-group">
            <label class="control-label col-md-2 col-sm-3">内容&nbsp;:</label>
            <div class="col-md-9 col-sm-8"><script id="contnetLook" style="width: 100%; height: 200px;"></script></div>
          </div>
        </form>
        <!-- 结束设置模块-->
      </div>
      <div class="modal-footer"><a href="javascript:;" class="btn btn-white" data-dismiss="modal">放弃操作</a></div>
    </div>
  </div>
</div>
<!-- ================== 结束查看资讯模态窗口 ================== -->

    <!--开启选择栏目模态窗口 -->
    <div class="modal fade" id="siteModal" tabindex="-1" role="dialog">
        <div class="panel-body">
            <div class="col-md-3 p-l-0">
                <a id="returnParent" href="javascript:;"
                   class="btn btn-white pull-left m-r-5 m-b-5 hidden"> <i
                        class="fa fa-lg fa-level-up m-r-5"></i>返回上级</a>
            </div>
        </div>
        <div class="modal-dialog modal-lg">
            <div class="modal-content">
                <div class="modal-header">
                    <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
                    <h4 class="modal-title">栏目列表<a class="btn btn-info btn-xs m-l-10" role="button" data-toggle="collapse" href="<#--#OperationTips-->" aria-expanded="false" title="操作提示"><i class="fa fa-exclamation"></i>&nbsp;提示</a></h4>
                </div>
                <div class="modal-body">
                    <div id="dtGridContainerSite" class="dt-grid-container"></div>
                    <div id="dtGridToolBarContainerSite" class="dt-grid-toolbar-container"></div>
                </div>
            </div>
        </div>
    </div>
    </div>
    <!--结束选择栏目模态窗口 -->


  <!-- ================== 开始页面级JavaScrip调用 ================== -->
  <!-- 表单checkbox项 -->
  <script src="${pluginsRoot}bootstrap-switch/bootstrap-switch.min.js"></script>
  <!-- 富文本编辑器 -->
  <script src="${pluginsRoot}ueditor/ueditor.config.js"></script>
  <script src="${pluginsRoot}ueditor/ueditor.all.js"></script>
  <script src="${pluginsRoot}ueditor/lang/zh-cn/zh-cn.js"></script>
  <script src="${pluginsRoot}/jquery.dtGrid/dependents/datePicker/WdatePicker.js" defer="defer"></script>
  <script src="${jsRoot}propaganda/article.handle.js"></script>
  <!-- ================== 结束页面级JavaScrip调用 ================== -->
</@c.html>
